package info.ask4research.model.enums;

public enum ResourceType {

	LADESCRIPTION(0), LAOBJECTIVE(1), LAPREREQUISITES(2), SADESCRIPTION(3);
	
	private int id;

	private ResourceType(int id) {
		this.id = id;
	}
	
	public int getId() {
		return this.id;
	}
	
    public static ResourceType valueOf(int value) {
        switch (value) {
            case 0: return LADESCRIPTION;
            case 1: return LAOBJECTIVE;
            case 2: return LAPREREQUISITES;
            case 3: return SADESCRIPTION;
            default: return LADESCRIPTION;
        }
    }
    
    public String getName() {
		switch(this.id) {
		case 0:
			return "LADESCRIPTION";
		case 1:
			return "LAOBJECTIVE";
		case 2:
			return "LAPREREQUISITES";
		case 3:
			return "SADESCRIPTION";
		default:
			return "LADESCRIPTION";
		}
	}
    
    @Override
    public String toString() {
		switch(this.id) {
		case 0:
			return "LADESCRIPTION";
		case 1:
			return "LAOBJECTIVE"; 
		case 2:
			return "LAPREREQUISITES"; 
		case 3:
			return "SADESCRIPTION"; 
		default:
			return "LADESCRIPTION";
		}
    }
    
}
